


#program for pattern matching

my $mystring;
$mystring = "Hello world!";
if($mystring =~ m/World/) { print "Yes"; }
if($mystring =~ m/World/i) { print "Yes"; }
$mystring =~ s/world/mom/;
print $mystring ,"\n";




#below code prints between start to end 

$mystring = "The start text always precedes the end of the end text.";
if($mystring =~ m/start(.*)end/) #start to end 

{ 
 	print $1;
}









